home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20010306-20010921
/
000248_fdc@watsun.cc.columbia.edu_Fri Jul 6 09:50:36 EDT 2001.msg
< prev
next >
Wrap
Text File
|
2001-09-20
|
4KB
|
102 lines
Article: 12573 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Any way to alter Kermit "quit" so I don't have to "kill?"
Date: 6 Jul 2001 13:50:53 GMT
Organization: Columbia University
Lines: 85
Message-ID: <9i4fnt$8jh$1@newsmaster.cc.columbia.edu>
References: <h_417.5247$oa1.534611@newsread1.prod.itd.earthlink.net> <9i2n2o$dgn$1@newsmaster.cc.columbia.edu> <ORb17.6797$oa1.654216@newsread1.prod.itd.earthlink.net>
NNTP-Posting-Host: watsun.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 994427453 8817 128.59.39.2 (6 Jul 2001 13:50:53 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 6 Jul 2001 13:50:53 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12573
In article <ORb17.6797$oa1.654216@newsread1.prod.itd.earthlink.net>,
Keith Doyle <keithuse@synco_pator.com> wrote:
: ...
: Though the shell does-- and that doesn't cause a disconnect.
:
: Also, neither does this simple C program, run in place of the
: kermit or lrz/lsz, so I'm inclined to doubt it's the close that's
: responsible for the disconnect:
:
When a program exits, all of its file descriptors are closed.
If they were not open already by some other process, this is a
"last close", and for serial ports, the driver sets DTR low.
How that affects whatever is connected to the port depends on
how that thing is configured - e.g. modems can be configured to
ignore DTR.
When C-Kermit closes a serial port for which a SET MODEM TYPE
(other than NONE or DIRECT) has been given, it also sends the
modem's hangup command, e.g. ATH0, if MODEM HANGUP-METHOD is
MODEM-COMMAND. Use SET MODEM HANGUP-METHOD RS232-SIGNAL to undo
this.
: d = open("/dev/modem",O_RDWR);
:
This should make DTR come on.
: sleep(4);
: close(d);
:
This should make DTR go off.
: exit (0);
:
And if that didn't, this should.
: 7. Kermit will warn you there may be an active connection, and ask you if
: you still want to exit. Your choice is to either not-exit or say yes
: you want to exit at which point it disconnects the line. I believe if
: it just did a "close" and then an "exit" here things would be ok, but
: more is going on.
:
You can avoid the warning with SET EXIT WARNING OFF.
: >Try the first method (-l 0) and see what happens. If that doesn't work,
: >what I'd recommend is to let Kermit handle everything -- dialing, terminal
: >session, and file transfer. That's what it's designed for.
:
: That may be what it's designed for, but I already have an exceedingly
: complex program that originally used zmodem that I'm not going to rewrite
: from scratch in a specialized script language I would have to learn
: special for that one purpose...
:
Don't blame us for a "specialized script language". It predates all your
other favorite ones except maybe Bourne shell and DCL, and it's also probably
more portable.
, when all I need is something that
: implements the protocol without mucking with the connection-- I just want
: to plug in a replacement protocol without rewriting the whole schmeer.
:
Then use G-Kermit instead of C-Kermit:
http://www.columbia.edu/kermit/gkermit.html
You can think of G-Kermit as Kermit's answer to lrz/lsz. It transfers
files over stdio, which it does not open or close, and can be redirected.
See the description of the -X option.
: If there's a way to make the FD approach work, it's worth investigating
: further. I presume it should work, but there's something I must not be
: doing right to set it up. I'll try it a little more and report back more
: specific on what I tried and how it acts. Thanks for the response-- I do
: get the idea that kermit in general is a far more sophisticated program than
: zmodem (certainly way more robust a protocol) but I must admit I rather like
: the modularity of keeping the protocol separate from the scripting...
:
This is the UNIX philosophy, but of course Kermit software (including
C-Kermit) is not just for UNIX. Anyway, experience shows that automating
complex communications tasks works better with an integrated script engine
than by, say, grafting 'expect' onto 'telnet' or 'cu' or 'ftp' or whatever.
For a brief discussion of this idea (as it applies to FTP) see:
http://www.columbia.edu/kermit/ftpscript.html
- Frank